package org.feign.client.impl;

import lombok.extern.slf4j.Slf4j;
import org.feign.client.UserFeignApi;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @author liuxm
 * @version 1.0
 * @date 2021/3/23 18:15
 */
@Component
@Slf4j
public class UserFeignApiImpl implements UserFeignApi {
    @Override
    public Map queyUserByName(String username) {
        log.info("feign ==> 服务降级方法被触发 username ==> {}", username);
        HashMap<Object, Object> map = new HashMap<>();
        map.put("code", "500");
        map.put("msg", "feign ==> 服务器出现异常了,请稍后重试");
        return map;

    }
}
